#SPDB_Informix_DBSPI_1002
# critical =2  正常 =1  major =0
# "0" : major
# "1" : 正常
# "2" : critical
SPDB_Informix_DBSPI_1002="1"
su - $sys_user -c "$Souce_File onstat -" >/dev/null
case $? in
5)
#echo "On-Line"
SPDB_Informix_DBSPI_1002="1"
;;
255)
#echo "shared memory not initialized"
SPDB_Informix_DBSPI_1002="0"
;;
2)
#echo "Read-Only (RSS)/Updatable (RSS)/Updatable (Sec)/Fast Recovery"
SPDB_Informix_DBSPI_1002="0"
;;
4)
#echo "Middle status"
SPDB_Informix_DBSPI_1002="1"
;;
1)
#echo "Quiescent"
SPDB_Informix_DBSPI_1002="0"
;;
7)
#echo "Single-User"
SPDB_Informix_DBSPI_1002="1"
;;
*)
#echo "Unknown status"
SPDB_Informix_DBSPI_1002="1"
;;
esac

echo SPDB_Informix_DBSPI---"$SPDB_Informix_DBSPI_1002" 